# -*- coding: utf-8 -*-
"""
file:ch2_3倒数的极限
author: Fuwen
time: 2022/7/15 6:58
software:PyCharm
"""
# x趋于无穷大时， y的极限 ， y=1/x, 函数收敛，

import matplotlib.pyplot as plt

x = [x for x in range(1,1001)]
y = [1/i for i in x]

plt.axis([1,1001, 0, 1.5])
plt.plot(x, y, '-o')
plt.xlabel('n')
plt.ylabel('y')
plt.grid()
plt.show()